<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
	<title th:text="${session.title}">123</title>
	<link th:replace="common/header"/>
	<link rel="stylesheet" th:href="@{/css/ace-skins.min.css}" />
	<link rel="stylesheet" th:href="@{/css/colorbox.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css/jquery.autocomplete.css}" />
</head>
	<body class="navbar-fixed">
  	<div th:replace="common/top"></div>
		<div class="container-fluid main_bg" id="main-container">
			<a id="menu-toggler" href="#"><span></span></a>
			<div th:replace="common/menu"></div>
			<div id="main-content" class="clearfix">
				<div id="page-content" class="clearfix">
					<div th:replace="common/title"></div>
					<h3 class="header smaller lighter blue"><em class="icon-plus"></em>球队战队赛报分(战队赛使用相同队伍比赛)</h3>
					<div th:if="${session.footUser.qx.text == '会员' || session.footUser.qx.text == 'VIP1' || session.footUser.qx.text == 'VIP2' || session.footUser.qx.text == 'VIP3'}">
                        <form class="form-horizontal" th:object="${footSociatyBfinfo}" method="post" th:action="@{/hy/footSociatyBfinfo/add}" name="form" autocomplete="off">
                            <input type="hidden" name="zd1" th:field="*{zd1}"/>
                            <input type="hidden" name="zd2" id="zd2" th:field="*{zd2}"/>
                            <input type="hidden" name="bfzt" th:field="*{bfzt}"/>
                            <h4 class="header smaller lighter blue">报分明细</h4>
                            <div class="row-fluid">
                            <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span12">
                                    <table style="width:100%" border="0">
                                        <tbody>
                                            <tr>
                                                <th style="width:60px">球队:</th>
                                                <td style="width:100px" th:text="${footSociatyBfinfo.zd1Name}">123</td>
                                                <th style="width:60px">进球:<span style="color:red">*</span></th>
                                                <td style="width:100px"><input th:field="*{jq1}" type="text" name="jq1" class="input-mini spinner-input" id="jq1" title=""/></td>
                                                <th style="width:60px">进球:<span style="color:red">*</span></th>
                                                <td style="width:100px"><input th:field="*{jq2}" type="text" name="jq2" class="input-mini spinner-input" id="jq2" title=""/></td>
                                                <th style="width:60px">球队:<span style="color:red">*</span></th>
                                                <td style="width:200px">
                                                    <input type="text" name="selectqd" id="selectqd" class="input_fix" placeholder="请手动输入对方玩家名称，本搜索支持模糊查询或者双击文本框"/></td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span12">
                                    <span style="color:red" th:if="${#fields.hasErrors('zd1')}" th:errors="*{zd1}">Name Error</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="text-center span12">
                                    <button class="btn btn-primary" type="submit" id="submits"><em class="icon-save"></em>提交</button>
                                    <button class="btn btn-danger" type="reset"><em class="icon-remove"></em>取消</button>
                                    <a class="btn" type="button" th:href="@{/index}"><em class="icon-arrow-left"></em>返回首页</a>
                                </div>
                            </div>
                        </form>
				    </div>
				    <div th:replace="common/skin :: skin"></div>
                </div>
		</div><!--/#main-content-->
	</div><!--/.fluid-container#main-container-->
	<div th:replace="common/js"></div>
	<script th:src="@{/js/jquery-ui.custom.min.js}"></script>
	<script th:src="@{/js/fuelux/fuelux.spinner.min.js}"></script>
	<script th:src="@{/js/jquery.autosize.min.js}"></script>
	<script th:src="@{/js/colorbox/jquery.colorbox.min.js}"></script>
	<script th:src='@{/js/jquery.autocomplete.min.js}'></script>
    <script th:src='@{/js/spinbox.min.js}'></script>
    <script type='text/javascript' th:src='@{/js/jquery-migrate-1.4.1.min.js}'></script>
    <script type="text/javascript">
   		$(document).ready(function(){
   			var search = [];
   			$.ajax({
				type: "POST",
				dataType: "json",
				url: "/hy/footBfinfo/searchSociaty",
				success: function(data){
					search = data;
					$("#selectqd").autocomplete(search,{
						minChars: 0,
						width: $("#selectqd").width() + 10,
						//matchContains: "word",
						autoFill: false,
						formatItem: function(row, i, max) {
							return row.name;
						},
						formatMatch: function(row, i, max) {
							return row.name;
						},
						formatResult: function(row) {
							return row.name;
						}
					});
				}
			});
   	    	$("#selectqd").result(function(event, data, formatted) {
                $("#zd2").val(data.id);
			});

			$('#jq1').ace_spinner({value:0,min:0,max:10,step:1, btn_up_class:'btn-info' , btn_down_class:'btn-info'})
				.on('change', function(){});
			$('#jq2').ace_spinner({value:0,min:0,max:10,step:1, btn_up_class:'btn-info' , btn_down_class:'btn-info'})
				.on('change', function(){});
   	  	});    
	</script>
	</body>
</html>
